home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / u_man / cat3 / Tcl / printdbl.z / printdbl
Text File  |  1998-10-30  |  3KB  |  67 lines

  1.  
  2.  
  3.  
  4. TTTTccccllll____PPPPrrrriiiinnnnttttDDDDoooouuuubbbblllleeee((((3333TTTTccccllll))))                                    TTTTccccllll____PPPPrrrriiiinnnnttttDDDDoooouuuubbbblllleeee((((3333TTTTccccllll))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      Tcl_PrintDouble - Convert floating value to string
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ttttccccllll....hhhh>>>>
  13.  
  14.      TTTTccccllll____PPPPrrrriiiinnnnttttDDDDoooouuuubbbblllleeee(_i_n_t_e_r_p, _v_a_l_u_e, _d_s_t)
  15.  
  16. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  17.      Tcl_Interp   *_i_n_t_e_r_p   (in)      Interpreter that controls the
  18.                                       conversion.
  19.  
  20.      double       _v_a_l_u_e     (in)      Floating-point value to be converted.
  21.  
  22.      char         *_d_s_t      (out)     Where to store string representing
  23.                                       _v_a_l_u_e.  Must have at least
  24.                                       TCL_DOUBLE_SPACE characters of storage.
  25.  
  26.  
  27. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  28.      TTTTccccllll____PPPPrrrriiiinnnnttttDDDDoooouuuubbbblllleeee generates a string that represents the value of _v_a_l_u_e and
  29.      stores it in memory at the location given by _d_s_t.  It uses %g format to
  30.      generate the string, with two special twists.  First, the string is
  31.      guaranteed to contain either a ``.'' or an ``e'' so that it doesn't look
  32.      like an integer (where %g would generate an integer with no decimal
  33.      point, TTTTccccllll____PPPPrrrriiiinnnnttttDDDDoooouuuubbbblllleeee adds ``.0'').  Second, the number of significant
  34.      digits printed at _d_s_t is controlled by the ttttccccllll____pppprrrreeeecccciiiissssiiiioooonnnn variable in
  35.      _i_n_t_e_r_p;  if ttttccccllll____pppprrrreeeecccciiiissssiiiioooonnnn is undefined then 6 significant digits are
  36.      printed.
  37.  
  38.  
  39. KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  40.      conversion, double-precision, floating-point, string
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.